package com.wxj.book.dao;

import com.wxj.book.pojo.Book;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface BookMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Book record);

    int insertSelective(Book record);

    Book selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Book record);

    int updateByPrimaryKey(Book record);

    List<Book> getRandom();

    List<Book> getByCategoryId(Integer categoryId);

    List<Book> getNewBook();

    List<Book> getAllByCategoryId(Integer categoryId);

    List<Book> getRecommendBook();

    List<Book> getByKey(String key);
}